import { createApp } from 'vue'

// CSS
import './assets/css/bootstrap.min.css'
import './assets/css/animate.min.css'
import './assets/css/remixicon.css'
import './assets/css/flaticon.css'
import './assets/css/jquery-ui.min.css'
import './assets/css/magnific-popup.min.css'
import './assets/css/simplebar.min.css'
import './assets/css/metismenu.min.css'
import './assets/css/owl.carousel.min.css'
import './assets/css/owl.theme.default.min.css'
import './assets/css/style.css'
import './assets/css/responsive.css'


//配置pinia
import {createPinia} from 'pinia'
import persist from 'pinia-plugin-persistedstate'
//配置路由
import router from './router'
//配置elementPlus
import ElementPlus from 'element-plus'
//配置国际化
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
//配置图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import App from './App.vue'
//创建pinia
let pinia = createPinia();
//给pinia使用插件
pinia.use(persist)


let app = createApp(App);
//配置图标
for(const [key,component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key,component)
}


//使用ElementPlus
app.use(ElementPlus,{
    locale: zhCn,
})


//使用pinia
app.use(pinia)


//使用router
app.use(router)
//绑定到 index.html id=app的元素下
app.mount('#app')

